<?php
$this->pageTitle=Yii::app()->name . ' - 用户登录';
$this->breadcrumbs=array(
	'Login',
);
?>
<div id="header">
	<div class="wrap_1000">
		<h1>
			<a href="/">
				<img src="/images/logo.png" title="<?php echo Yii::app()->name?>"/>
				<span><?php echo $title?></span>
			</a>
		</h1>
		<div id="right_nav">
			<a href="">测试</a>
		</div>
	</div>
</div>
<div id="login_content" class="wrap_1000">
	<div id="login_ad">
		<img src="/images/login_ad.jpg"/>
	</div>
	
	<?php 
	$form = $this->beginWidget('CActiveForm', array(
		'id'						=> 'login_form',
		'enableClientValidation'	=> true,
		'clientOptions'				=> array(
			'validateOnSubmit'		=> true,
		),
	)); 
	?>
	<div class="row">
		<label for="LoginForm_username">用户名：</label><br>
		<?php 
			echo $form->textField($model,'username'); 
			echo $form->error($model,'username'); 
		?>
	</div>

	<div class="row">
		<label for="LoginForm_password">密　码：</label><br>
		<?php 
			echo $form->passwordField($model,'password'); 
			echo $form->error($model,'password'); 
		?>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
    <div class="row">
        <label for="LoginForm_captcha">验证码：</label><br>
        <?php echo $form->textField($model,'captcha'); ?>
        <?php $this->widget('CCaptcha', array('imageOptions'=>array('class'=>'captcha'))); ?>
        <?php echo $form->error($model,'captcha'); ?>
    </div>
    <?php endif;?>
	<div class="row rememberMe">
		<?php echo $form->checkBox($model,'rememberMe'); ?>
		<?php echo $form->label($model,'rememberMe'); ?>
		<?php echo $form->error($model,'rememberMe'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('登　录', array('id'=>'login_btn', 'class'=>'button')); ?>
	</div>
	<?php $this->endWidget(); ?>
</div>
<div id="footer">
	<div class="wrap_1000">
		<a href="#">测试</a>
		<div id="copyright">
			© <?php echo date('Y')?> <?php echo Yii::app()->name ?>. All rights reserved.
		</div>
	</div>
</div>
<script>
	$(function(){
		$('#footer').css({'position':'fixed','bottom':0,'width':'100%'});
	});
</script>